Explore what multiple ocean instances would mean#650
Conversation
Once i started pulling on the thread i could not stop. This branch should work like before iwth one ocean, there are a few issues before it will support multiple instances. Questions / problems that arose: Lod data resolution should be global setting, right now taken from one instance Validation gets passed "AnyInstance" in a few places, is this ok? RenderData.Validate - uses any instance RegisterLodDataClipSurface - this sets per-ocean data on MPB. might be tricky to fix.. How to connect underwater effect to ocean instance? How to connect underwater environment lighting with ocean instance? Debuggui always takes first instance of ocean, shall we make this selectable? OceanChunkRenderer.OnWillRenderObject - tiles will need Layer so it only goes in one camera?? tag @daleeidd @moosichu in case this is of interest
|
I have the following assumption:
Going with the simpler assumption of a one to one mapping with camera and ocean.
Same as above. Although, developers would have to use light layers and have two separate lights for it to work. I think we should instead add validation stating that this component doesn't support multiple instances. And maybe add support in the future.
We already have this for built-in. I think SRP uses something different. We could validate this if we have a camera property.
We should be passing all instances. Since these components are shared by both instances, they should be valid for both instances. The validate function will need to be updated to take list of OceanRenderers. I will look into doing this at some point. |
Validation already enforces a camera as a parent.
Multiple Oceans: Connect underwater to ocean instance
|
Updated above comment. |
Status: Definitely not ready to merge. I'm creating this as someone enquired about it and it took me a while to find it.
Experiment with what would be required for multiple oceans: #540
This branch should work like before in the case of a single ocean. There are a few issues before it will support multiple instances.
Questions / problems that arose:
Misc notes: